package tbalert.web.manager.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import tbalert.hibernate3.Updater;
import tbalert.web.dao.YmjgDao;
import tbalert.web.entity.Ymjg;
import tbalert.web.manager.YmjgMng;

@Transactional
public class YmjgMngImpl implements YmjgMng {
	@Autowired(required = true)
	private YmjgDao ymjgDao;

	@Override
	public Ymjg deleteById(String kicid) {
		return ymjgDao.deleteById(kicid);
	}

	@Override
	public Ymjg findById(String kicid) {
		return ymjgDao.findByKicid(kicid);
	}

	@Override
	public Ymjg save(Ymjg ymjg) {
		return ymjgDao.save(ymjg);
	}

	@Override
	public Ymjg update(Ymjg ymjg) {
		Updater<Ymjg> updater = new Updater<Ymjg>(ymjg);
		return ymjgDao.updateByUpdater(updater);
	}

}
